package com.cloudpivot.receivales.workorder.service;

import com.alibaba.fastjson.JSONObject;
import com.cloudpivot.receivales.workorder.domain.AnnotaionsDTO;
import com.cloudpivot.receivales.workorder.domain.RspReportDTO;
import com.cloudpivot.receivales.workorder.domain.TechnicalWorkDTO;
import com.cloudpivot.receivales.workorder.domain.WorkorderReportDTO;

import java.util.Map;

public interface WorkorderPoiService {

    /**
     * 创建文档对象
     */
    void createWorkorderReportFile(WorkorderReportDTO entity);

    /**
     * 创建 工单签字文档 by url
     * @param entity
     * @param url
     */
    void createWorkorderFileBySignUrl(WorkorderReportDTO entity, String url);

    /**
     * 创建 工单签字文档 by base64 中台不用 只用于测试
     * @param entity
     * @param base64Sign
     */
    void createWorkorderFileBySignbase64(WorkorderReportDTO entity, String base64Sign);

    /**
     * 模版生成签字文档 by base64 输出流
     * @param entity
     * @param base64Sign
     */
    Map<String,Object> createWorkorderStreamBySignbase64(WorkorderReportDTO entity, String base64Sign);

    /**
     * 技术工单
     * 模版生成签字文档 by base64 输出流
     * @param entity
     */
    Map<String,Object> createTechnicalWorkBySignbase64(TechnicalWorkDTO entity);

    /**
     * 获取 工单记录
     * @param crmid
     */
    WorkorderReportDTO getWorkOrderDetail(String crmid);

    /**
     * 获取 工单附件
     */
    RspReportDTO<AnnotaionsDTO> getWorkOrderAnnotations(String guid);

    String addTechnicalWorkAnnotations(String base64, String guid);

    /**
     * 上传 工单附件
     */
    String addWorkOrderAnnotations(String base64,String guid);

    /**
     * 删除附件
     */
    RspReportDTO delWorkOrderAnnotations(String guid);
}
